package cz.boxdesign.vizitky.web;

import java.util.Date;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@Component
public class InitController {

	protected final Log LOG = LogFactory.getLog(InitController.class);

  @RequestMapping(value = "/welcome")
	public ModelAndView handleRequest(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		String now = (new Date()).toString();

		this.LOG.info("Redirecting to welcome view.");
		return new ModelAndView("welcome");
	}


}
